package com.zelin.pojo;

import com.baomidou.mybatisplus.annotation.*;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.sql.Timestamp;
import java.util.Date;

/**
 * Created by WF on 2021/10/19 14:46
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("student")
public class Student implements Serializable {
    @TableId(type = IdType.AUTO)
    private Integer sid;

    private String sname;

    private String sex;

    private Integer age;

    private String addr;

    private Integer cid;

    @TableField(exist = false)      //代表数据库表中不存在此字段
    private String cname;

    @TableField(fill = FieldFill.INSERT)    //代表添加学生时自动生成
    private String createTime;


    @TableField(fill = FieldFill.UPDATE)    //代表修改学生时自动生成
    private String updateTime;

    @TableLogic(value = "0",delval = "1")   //value: 代表未删除值 delval:代表己删除值
    private int deleted;                    //逻辑删除字段
    private static final long serialVersionUID = 1L;
}